﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeBehind="StrategyManage.aspx.cs" Inherits="XinBang.Web.Admin.StrategyManage" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="headerplace" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="mainplace" runat="server">
<h2><asp:Literal ID="ttitle" runat="server" Text="营销策略管理"></asp:Literal></h2>
<asp:MultiView ID="MultiView1" runat="server">
    <asp:View ID="View1" runat="server">
        <ul>
            <li><a href="StrategyManage.aspx?action=manage">查看所有营销策略</a></li>
        </ul>
    </asp:View>
    <asp:View ID="View2" runat="server">
        <asp:ObjectDataSource ID="saleStrategyObjectDataSource" runat="server" OnDeleted="DeletedStrategy" OnDeleting="DeletingStrategy"
         OnUpdated="UpdatedStrategy" OnUpdating="UpdatingStrategy" SelectMethod="GetAllStrategys" TypeName="XinBang.BLL.SaleStrategyBL" DataObjectTypeName="XinBang.Entity.SaleStrategy"
         DeleteMethod="DeleteStrategy" InsertMethod="InsertStrategy" UpdateMethod="UpdateStrategy"></asp:ObjectDataSource>
        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False" DataKeyNames="Salid"
            CssClass="show" PageSize="20" DataSourceID="saleStrategyObjectDataSource">
            <AlternatingRowStyle CssClass="alt" />
            <PagerStyle CssClass="pager" />
            <PagerSettings FirstPageText="首页" LastPageText="末页" Mode="NextPreviousFirstLast"
                    NextPageText="下一页" PreviousPageText="上一页" />
            <EmptyDataTemplate>
                没有查询到营销策略。
            </EmptyDataTemplate>
            <Columns>
                <asp:BoundField DataField="Salid" HeaderText="编号" SortExpression="Salid">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="Strategy" HeaderText="营销策略" SortExpression="Strategy" />
                <asp:BoundField DataField="Note" HeaderText="策略说明" SortExpression="Note" />
                <asp:CommandField HeaderText="编辑" ShowEditButton="True">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:CommandField>
                <asp:CommandField HeaderText="删除" ShowDeleteButton="True">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:CommandField>
            </Columns>
        </asp:GridView>
        <div class="show">
            <asp:LinkButton ID="linkButtonAddNew" runat="server" OnClick="linkButtonAddNew_Click">添加新的营销策略</asp:LinkButton>
        </div>
        <asp:Panel ID="panelSaleStrategy" runat="server" CssClass="show" Visible="false">
            策略名称:<asp:TextBox ID="textBoxStrategy" runat="server"></asp:TextBox><br />
            策略说明:<asp:TextBox ID="textBoxNote" runat="server"></asp:TextBox><br />
            <asp:LinkButton ID="linkButtonInsert" runat="server" OnClick="linkButtonInsert_Click">添加</asp:LinkButton>
        </asp:Panel>
    </asp:View>
</asp:MultiView>
</asp:Content>